package com.forenow.demo.demo6;

import java.util.ArrayList;
import java.util.List;

public class NewTest {
    public  void m1(List a){
        a.size();
    }
    public List m2(){
        List  a=new ArrayList();
        return a;
    }

    public static void main(String[] args) {
        NewTest newTest=new NewTest();
        List list=new ArrayList();  //相当于父类的引用指向子类的对象
        newTest.m1(list);

        List list1=newTest.m2();
        list1.size();
    }
}
